<!DOCTYPE html>
<html>

	<head lang="en">
		<title>找攻略</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
		<script src="/js/jquery/jquery.min.js"></script>
		<script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
		<link rel="stylesheet" href="/css/reset.css" />
		<link rel="stylesheet" href="/css/strategy.css" />
		<script src="/js/plugins/jrender/jrender.min.js"></script>

		<title>WangID通城</title>
		<link rel="stylesheet" href="/shopping/css/index.css" type="text/css">
		<link rel="stylesheet" href="/shopping/css/zy.css" type="text/css">
		<link rel="stylesheet" href="/shopping/css/swiper.min.css" type="text/css">
		<script type="text/javascript" src="/shopping/js/swiper.min.js"></script>
		<script src="/js/plugins/jrender/jrender.min.js"></script>

		<meta content="WangID通城" http-equiv="keywords">
		<meta name="description" content="WangID通城">
		<meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
		<link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
		<script src="/js/plugins/dialog2/dialog.min.js"></script>
		<!---->

		<script>
            $(function () {
                //查所有订单
                $.get("/users/productOrders", function (data) {
                    console.log(data);
                    $("#pills-top").renderValues(data,{
                        getImg:function (item,value) {
                            if (value) {
                            	$(item).attr("src",value[0])
                            }
                        },
                        getHref:function (item,value) {
                            var href= $(item).data("href");
                            $(item).attr("href",href+value)
                        },
                        getPrice:function (item,value) {
                            $(item).html("单价:"+value+"￥").css("color","red")
                        }
                    });
                })
				//查未支付订单
                 $.get("/users/productOrders",{freight:0},function (data) {
                     console.log(data);
                     $("#pills-1").renderValues(data,{
                         getImg:function (item,value) {
                             if (value) {
                             	$(item).attr("src",value[0])
                             }
                         },
                         getHref:function (item,value) {
                             var href= $(item).data("href");
                             $(item).attr("href",href+value)
                         },
                         getPrice:function (item,value) {
                             $(item).html("单价:"+value+"￥").css("color","red")
                         }
                     });
                 })
				//查待收货订单
                $.get("/users/productOrders",{freight:1},function (data) {
                    console.log(data);
                    $("#pills-2").renderValues(data,{
                        getImg:function (item,value) {
                            if (value) {
                            	$(item).attr("src",value[0])
                            }
                        },
                        getHref:function (item,value) {
                            var href= $(item).data("href");
                            $(item).attr("href",href+value)
                        },
                        getPrice:function (item,value) {
                            $(item).html("单价:"+value+"￥").css("color","red")
                        },
                        setId:function (item,value) {
							$(item).attr("data-pid",value);
                        }
                    });

                    //确认收货按钮
					$("#suerProduct").click(function () {
						var productId = $(this).data("pid");
                        $(document).dialog({
                            type : 'confirm',
                            closeBtnShow: true,
                            content: '确认收货?',
                            onClickConfirmBtn: function(){
                                $.ajax({
                                    type: "put",
                                    url: "/users/"+productId+"/productOrder",
                                    data: {freight:2},
                                    success: function(data){
                                        location.reload();
                                    }
							           

								})
                            }

                        });
                    })

                })
				//查已收货订单
                $.get("/users/productOrders",{freight:2},function (data) {
                    console.log(data);
                    $("#pills-3").renderValues(data,{
                        getImg:function (item,value) {
                            if (value) {
                            	$(item).attr("src",value[0])
                            }
                        },
                        getHref:function (item,value) {
                            var href= $(item).data("href");
                            $(item).attr("href",href+value)
                        },
                        getPrice:function (item,value) {
                            $(item).html("单价:"+value+"￥").css("color","red")
                        }
                    });
                })
            })
		</script>
	</head>

	<body>

	<!--页面内容
	<div id="yemnr">-->
	<!--头部-->
	<div class="toub_beij toub_beij_zy">
		<div class="zhongj_k zhongj_k_z">
			<div class="jiu_feo">
				<div class="logo_k logo_k_fanh"><a href="/shopping/index.html"><img class="fanh_ann" src="/shopping/images/web/fanh.png"></a>
				</div>
				<div class="zhongjain_daoh">
					<ul>
						<li class="qbdd no"><a href="订单.html" class="zyyge">实物订单</a></li>
						<li class="qbdd qbdd_you"><a href="#" class="zyyge">其他订单</a></li>
					</ul>
				</div>
			</div>
			<div class="dengl">
				<div class="caid_img" id="zhu_caid"><img src="/shopping/images/web/cd_1.png"></div>
				<ul class="zhu_daoh" id="daoh_lb">
					<em></em>
					<li><a href="index.html">首页</a></li>
					<li><a href="分类.html">商品分类</a></li>
					<li><a href="#">扫一扫</a></li>
					<li><a href="购物车.html">购物车</a></li>
					<li class="wu"><a href="我的.html">我的通城</a></li>
				</ul>
			</div>
		</div>
	</div>
	<script type="text/javascript">
        //滑动头部透明（针对首页头部用）
        window.onscroll = function () {

            var autoheight = document.body.scrollTop || document.documentElement.scrollTop;
            if (autoheight > 10) {
                $(".toub_beij").css("position", "fixed")
            } else {
                $(".toub_beij").css("position", "relative")
            }
        }
	</script>


<!---->
	<div class="dingd_k">
		<div class="dind_daoh">
<!---->

			<ul class="nav nav-pills nav-justified border border-left-0 border-top-0 border-right-0" id="pills-tab" role="tablist">
				<li class="nav-item">
					<a class="active show" data-toggle="pill" href="#pills-top">
						<span style="font-weight: bold;">全部</span>
					</a>
				</li>

				<li class="nav-item">
				<a data-toggle="pill" href="#pills-1">待支付</a>
				</li>
				<li class="nav-item">
				<a data-toggle="pill" href="#pills-2">待收货</a>
				</li>
				<li class="nav-item">
				<a data-toggle="pill" href="#pills-3">待评价</a>
				</li>
			</ul>
		</div>

	<div class="tab-content" id="pills-tabContent">
		<div class="gouwuc_kk gouwuc_kk_ddxq tab-pane fade active show" id="pills-top">
			<div class="dianpmc_gw">
				<a href="#">
					<p class="px24">骡窝窝官方专营店></p>
					<em></em>
				</a>
			</div>
			<!--<div class="container strategyCommend">-->
				<ul  render-loop="list">
					<li>
						<div>
						</div>
						<div class="dingd_hao">订单号:
							<p render-html="list.sequence"></p>
							<a data-href="productFinishi?id=" render-key="list.id" render-fun="getHref">查看详情</a>
							<p render-html="list.createTime"></p>
						</div>
						<div  render-loop="list.products">
							<div class="diannao_shanp">
								<a href="#"><h1><img render-key="list.products.imgArr" render-fun="getImg"></h1></a>
								<div class="you">
									<a href="#"><p class="px24 bt" render-html="list.products.title"></p></a>
									<p class="xh" render-html="list.products.specs.name"></p>

									<p class="xh" render-key="list.products.price" render-fun="getPrice"></p>
									<div class="youjfy">
										<div class="goum_sl">
											<div class="counter_box">
												<span>X</span>
												<span render-html="list.products.count"></span>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="qqq_jia">
							<div class="zuo">
								<p>状 态：<em render-html="list.state"></em></p>
								<p>总 价：<em class="qq" render-html="list.totalPrices"></em>￥</p>
							</div>
							<div class="you">

							</div>
						</div>
					</li>

				</ul>
			<!---->
			<!--</div>-->
		</div>
		<div class="gouwuc_kk gouwuc_kk_ddxq tab-pane fade" id="pills-1">
			<div class="container">
				<div class="dianpmc_gw">
					<a href="#">
						<p class="px24">骡窝窝官方专营店></p>
						<em></em>
					</a>
				</div>
				<!--<div class="container strategyCommend">-->
				<ul  render-loop="list">
					<li>
						<div>
						</div>
						<div class="dingd_hao">订单号:
							<p render-html="list.sequence"></p>
							<a data-href="productFinishi?id=" render-key="list.id" render-fun="getHref">查看详情</a>
							<p render-html="list.createTime"></p>
						</div>
						<div  render-loop="list.products">
							<div class="diannao_shanp">
								<a href="#"><h1><img render-key="list.products.imgArr" render-fun="getImg"></h1></a>
								<div class="you">
									<a href="#"><p class="px24 bt" render-html="list.products.title"></p></a>
									<p class="xh" render-html="list.products.specs.name"></p>

									<p class="xh" render-key="list.products.price" render-fun="getPrice"></p>
									<div class="youjfy">
										<div class="goum_sl">
											<div class="counter_box">
												<span>X</span>
												<span render-html="list.products.count"></span>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="qqq_jia">
							<div class="zuo">
								<p>状 态：<em render-html="list.state"></em></p>
								<p>总 价：<em class="qq" render-html="list.totalPrices"></em>￥</p>
							</div>
							<div class="you">
								<p>
									<a data-href="/mine/paymentPage.html?id=" render-key="list.id" render-fun="getHref">去支付</a>
								</p>
							</div>
						</div>
					</li>

				</ul>





			</div>
		</div>

		<div class="gouwuc_kk gouwuc_kk_ddxq tab-pane fade" id="pills-2">
			<div class="container">
				<div class="dianpmc_gw">
					<a href="#">
						<p class="px24">骡窝窝官方专营店></p>
						<em></em>
					</a>
				</div>
				<!--<div class="container strategyCommend">-->
				<ul  render-loop="list">
					<li>
						<div>
						</div>
						<div class="dingd_hao">订单号:
							<p render-html="list.sequence"></p>
							<a data-href="productFinishi?id=" render-key="list.id" render-fun="getHref">查看详情</a>
							<p render-html="list.createTime"></p>
						</div>
						<div  render-loop="list.products">
							<div class="diannao_shanp">
								<a href="#"><h1><img render-key="list.products.imgArr" render-fun="getImg"></h1></a>
								<div class="you">
									<a href="#"><p class="px24 bt" render-html="list.products.title"></p></a>
									<p class="xh" render-html="list.products.specs.name"></p>

									<p class="xh" render-key="list.products.price" render-fun="getPrice"></p>
									<div class="youjfy">
										<div class="goum_sl">
											<div class="counter_box">
												<span>X</span>
												<span render-html="list.products.count"></span>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="qqq_jia">
							<div class="zuo">
								<p>状 态：<em render-html="list.state"></em></p>
								<p>总 价：<em class="qq" render-html="list.totalPrices"></em>￥</p>
							</div>
							<div class="you">
								<p>
									<a role="button" id="suerProduct" render-key="list.id" render-fun="setId">确认收货</a>

								</p>
							</div>
						</div>
					</li>

				</ul>



			</div>
		</div>

		<div class="gouwuc_kk gouwuc_kk_ddxq tab-pane fade" id="pills-3">
			<div class="container">
				<div class="dianpmc_gw">
					<a href="#">
						<p class="px24">骡窝窝官方专营店></p>
						<em></em>
					</a>
				</div>
				<!--<div class="container strategyCommend">-->
				<ul  render-loop="list">
					<li>
						<div>
						</div>
						<div class="dingd_hao">订单号:
							<p render-html="list.sequence"></p>
							<a data-href="productFinishi?id=" render-key="list.id" render-fun="getHref">查看详情</a>
							<p render-html="list.createTime"></p>
						</div>
						<div  render-loop="list.products">
							<div class="diannao_shanp">
								<a href="#"><h1><img render-key="list.products.imgArr" render-fun="getImg"></h1></a>
								<div class="you">
									<a href="#"><p class="px24 bt" render-html="list.products.title"></p></a>
									<p class="xh" render-html="list.products.specs.name"></p>

									<p class="xh" render-key="list.products.price" render-fun="getPrice"></p>
									<div class="youjfy">
										<div class="goum_sl">
											<div class="counter_box">
												<span>X</span>
												<span render-html="list.products.count"></span>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="qqq_jia">
							<div class="zuo">
								<p>状 态：<em render-html="list.state"></em></p>
								<p>总 价：<em class="qq" render-html="list.totalPrices"></em>￥</p>
							</div>
							<div class="you">
								<p>
									<a href="GeRenZhongXin_PingJiaShaiDan.html">去评价</a>
									<a href="#" class="color_1">再次购买</a>
								</p>
							</div>
						</div>
					</li>

				</ul>



			</div>
		</div>

	</div>
		<!---->
	</div>
<!---->

	</body>

</html>